From 1187dbb126f07c4af917734bcba44abb4947efeb Mon Sep 17 00:00:00 2001 From: "sos22@labyrinth.cl.cam.ac.uk" Date: Tue, 8 Jul 2003 12:00:08 +0000 Subject: [PATCH] bitkeeper revision 1.295.1.1 (3f0ab248afF1UFguFgbsaTJFp_Bl7g) Fix stupid omission from last checkin. --- xenolinux-2.4.21-sparse/fs/partitions/xeno.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xenolinux-2.4.21-sparse/fs/partitions/xeno.c b/xenolinux-2.4.21-sparse/fs/partitions/xeno.c index e1db412e91..462b4a5c1b 100644 --- a/xenolinux-2.4.21-sparse/fs/partitions/xeno.c +++ b/xenolinux-2.4.21-sparse/fs/partitions/xeno.c @@ -12,6 +12,7 @@ #include "xeno.h" extern int xenolinux_control_msg(int operration, char *buffer, int size); +extern unsigned short xldev_to_physdev(kdev_t xldev); /* Grab the physdisk partitions list from the hypervisor. */ int xeno_partition(struct gendisk *hd, @@ -39,7 +40,6 @@ int xeno_partition(struct gendisk *hd, } if (buf->n_aces == PHYSDISK_MAX_ACES_PER_REQUEST) { - printk("Error getting Xen partition table, trying ordinary one...\n"); kfree(buf); return 0; } @@ -47,13 +47,15 @@ int xeno_partition(struct gendisk *hd, count = 0; for (i = 0; i < buf->n_aces; i++) { - if (buf->entries[i].partition == 0) + if (buf->entries[i].partition == 0) { continue; + } /* Make sure the partition is actually supposed to be on this disk. This assumes that Xen and XenoLinux block device numbers match up. */ - if (buf->entries[i].device != bdev->bd_dev) + if (buf->entries[i].device != xldev_to_physdev(bdev->bd_dev)) { continue; + } /* This is a bit of a hack - the partition numbers are specified by the hypervisor, and if we want them to match up, this is what we need to do. */ -- 2.30.2